/* Markdown styling */
.markdown-content {
  @apply max-w-none break-words text-sm overflow-hidden;
}

/* 代码块样式优化 */
.markdown-content pre {
  @apply bg-gray-100 dark:bg-gray-800 rounded-md overflow-auto my-4 max-w-full shadow-sm;
  position: relative;
  padding: 1rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  white-space: pre;
  word-break: normal;
}

/* 代码语法样式 */
.markdown-content code {
  @apply bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono;
  color: #e83e8c;
}

/* 代码块内的代码不需要背景色和内边距 */
.markdown-content pre code {
  @apply bg-transparent p-0 text-gray-800 dark:text-gray-200;
  color: inherit;
  display: block;
  line-height: 1.5;
  font-size: 0.875rem; /* 14px */
}

/* 代码行高亮效果 */
.markdown-content pre code .highlight-line {
  @apply bg-blue-50 dark:bg-blue-900 -mx-4 px-4 block border-l-4 border-blue-500;
}

/* 特定语言的语法高亮 - 模拟一些基本的语法高亮效果 */
.markdown-content code .keyword {
  color: #569CD6; /* 蓝色 - 关键字 */
}

.markdown-content code .string {
  color: #CE9178; /* 棕色 - 字符串 */
}

.markdown-content code .function {
  color: #DCDCAA; /* 黄色 - 函数 */
}

.markdown-content code .comment {
  color: #6A9955; /* 绿色 - 注释 */
}

/* 确保表格不会溢出 */
.markdown-content table {
  @apply border-collapse w-full my-3 table-fixed;
}

/* 表格样式美化 */
.markdown-content table th {
  @apply bg-gray-100 dark:bg-gray-800 font-semibold;
}

.markdown-content table th, .markdown-content table td {
  @apply border border-gray-300 dark:border-gray-600 p-2 text-left;
}

/* 隔行变色 */
.markdown-content table tr:nth-child(even) {
  @apply bg-gray-50 dark:bg-gray-900;
}

/* 确保图片不会溢出 */
.markdown-content img {
  @apply max-w-full rounded my-3;
}

/* 引用块样式美化 */
.markdown-content blockquote {
  @apply border-l-4 border-gray-300 dark:border-gray-600 pl-4 italic my-4 text-gray-700 dark:text-gray-300;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.5rem 1rem;
  border-radius: 0 0.25rem 0.25rem 0;
} 